package cn.lm.activit.module;

import cn.lm.activit.module.dto.PeopleDto;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.joda.time.DateTime;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * @author lm_jcf
 * @date 2019/2/13 13:54
 */
public class LambdaFormula {

    public static void main(String[] args) {

        /*Arrays.asList("a", "b", "c").forEach(e -> System.out.println(e));

        List<Integer> list = Lists.newArrayList(1, 2, 1, 33, 55, 6);

        list.forEach(e -> System.out.println(e));

        System.out.println();*/

        LocalDate localDate = LocalDate.now();
        System.out.println(localDate.getYear());

        LocalDate localDate1 = LocalDate.now();

        LocalDateTime localDateTime = LocalDateTime.now();
        System.out.println(localDateTime.format(DateTimeFormatter.ofPattern("Y-M-d H:m:s e")));

        System.out.println(localDateTime.format(DateTimeFormatter.ofPattern("e")));
        System.out.println(localDateTime.minusDays(3).format(DateTimeFormatter.ofPattern("Y-M-d e")));


        Map<String, String> map = Maps.newConcurrentMap();
        map.forEach((k,v) ->System.out.println(k+v));


        final PeopleDto dto = new PeopleDto();
        dto.setName("江");

        int i = 1;
        List<Integer> list = Lists.newArrayList(8, 1, 5, 6);

        list.forEach(e ->{
            dto.setName("零");
        });
        System.out.println(dto.getName());


        int iaa = 8>>>16 & 16;

        System.out.println(iaa);
        System.out.println( 8>>>1);


    }
}
